USBORNE ... FOR. ..COMMODORE 64. . .VIC 2 . .TRS 80 32K . . BBC. .ELECTRON . ORIGINALLY PUBLISHED now: WEIRD COMPUTER GAMES Jenny Tyler :'.V Contents 2 About this book 3 Tower of Terror 4 Skulls of The Pyramid 6 Monster Wrestling 8 Jaws 10 Flying Witches 12 Micropuzzle 17 Answers to puzzles / t * 1 ■ About this book The programs in this book axe written in a standard version of BASIC and there are conversion lines to type in for most of the main types of home computers. Look down the left-hand side of the program for the symbol for your computer and then look at the list of changes for the correct version of that line. The symbols for the various computers are as follows: a Commodore 64 and VIC 20 ★BBC and Electron ^Spectrum •Apple ■ TRS-80 (extended BASIC version) About the games The games in this book are very simple. They are intended to help you get used to your computer and to the BASIC language by typing in listings, debugging them and seeing how they work. The programs do not contain graphics or sound as these vary so much from computer to computer, but you can try adding these. You can change and adapt the games as much as you like. There are suggestions for ways of doing this next to each program and you can experiment with your own ideas as well. This way you can use the games in this book as a basis for longer, more complicated games of your own. Typing and running the programs Remember, even short programs can be quite difficult and time- consuming to type in correctly. Check each line as you go. It is so easy to make mistakes, even if you are quite experienced. When you have typed in the whole listing, check it again, making sure you haven't missed any lines, spaces or punctuation. To start the game, type RUN. Read the introduction to the game first so that you have some idea of what you are supposed to do before you start. If the program doesn't work properly, it is quite likely that there is a mistake in it somewhere, so LIST the program and check again. When the game is over, the computer may ask if you want to play again or say something like BREAK in 200, in which case you must type RUN to play again. Changing the speed Some games depend on the speed . of both your reactions and your computer. You may find you need to adjust the speed. You will find instructions for doing this next to the program listing. Micropuzzle was written by Les Howarth and Monster Wrestling by Adrian Hall. Illustrated by Rob McCaig, Sue Walliker, Martin Newton and Graham Smith. Designed by Roger Priddy First published in 1984 by Usborne Publishing Ltd, 20 Garrick Street, London WC2E 9BJ. © 1984 Usborne Publishing Ltd The name Usborne and the device *t±?ar< Trade Marks of Usborne Publishing Ltd. Tower of Terror $ Jjgsj" Your mouth is dry, your legs are shaking and your heart is thumping - you've entered the Tower of Terror . . . } o Press G to move through the rooms. Agh! ! there's a skeleton, then a ghost, then a headless axeman! With each fresh shock your pulse rate rockets. Will you go on (G), or retreat (R) to recover a little? Watch the time - you've only got until midnight to reach the top of the Tower and the coveted Treasure. Watch your pulse rate too. Madness takes over when it reaches 1 50 and nothing can stop you leaping to your doom out of the window. C Try changing the pulse rate limit. C Can you work out how to add more rooms too? CD 10 G0SU& 470 20 LET RJ="600D LUCK" 30 LET Rrt=0 lOW LET H=9: LET M=INTiRNf>ll)#10>*10 50 LET P=5Q )A60 CLS:PRINT:PRINT 70 PRINT 'TOWER OF TERROR" 90 PRINT ■===============" 90 PRINT : PRINT R$ " 100 LET R$="":LET FL=INT\Rrt/5> 110 LET ft=RM-FL*5+l 120 PRINT: PRINT "YOU ARE ON" 130 IF FL=0 THEN PRINT "THE GROUND FLOOR" 140 IF FL=6 THEN PRINT "THE TOP FLOOR" 150 IF FL>0 AND FL<i THEN PRINT "FLOOR "|FL 160 PRINT "IN ROOM ':R 170 PRINT: PRINT 'THE TINE IS ";H; ". ';»?' PIT > 180 PRINT:PRINT "YOUR PULSE RATE IS ";P 190 LET GF=0 200 IF RM=30 THEN GOTO 350 IO2I0 LET TR=INT(RND(I)t9*l) 1^220 IF RNDU)>.6 THEN 50SUB 420 230 PRINT: PRINT "RETREAT OR GO ON (R/GP >«A240 LET J$=INKEYJ 250 IF UO"G" AND [JO'R" THEN GOTO 240 260 IF I$=-G" THEN GDSUfl 400 270 IF I*="R" THEN LET RM=RM- 1 : LET P=P-5 230 IF RM--I THEN LET RM*0 290 LET H=H+INT(RND(1)#3H):IF M>59 THEN LET M=M-60:LET H=H+1 300 IF H=12 THEN GOTO 360 310 IF P>150 THEN GOTO 390 See if you can add more nasties and change their shock ratings. !0 IF P<40 THEN LET P=40 G0SUB 520 ( What is the Treasure of \ Tower and how did it / get there . . .? Perhaps \ you can add your ideas to the program. a $330 IF FL=TR AND RND(i)>0.5 THEN 340 60T0 60 350 PRINT "WELL DONE ":ST0P 360 PR1NT.-PRINT 'IT S MIDNIGHT!" 370 PRINT: PRINT "TOO LATE!":ST0P 380 PRINT "YOU HAVE GONE MAD AND" 390 PRINT "LEAPT FROM A WINDOW STOP 400 IF GF=1 THEN LET P=P+S*2:LET R$=" 410 LET P=P-UL£T RK^RMHi RETURN O420 LET TY=INT(RND(I>#3+1) 430 LET M=GWY) l<X440 LET S=INT(RND(1I*5)+FL+TY*2 450 PRINT: PRINT "AHEAD YOU SEE A ";«* 460 LET SF=1 : RETURN 470 DIM 6$(3) 430 LET 6$U)='SKELET0N' 490 LET G$(2)='GH0ST U 500 LET G$13)="HEADIES5 AXEMAN" 510 RETURN 520 LET R$="Y0U FELL THROUGH A TRAP D00R!":LET RM=RM-5:LET P=P+10: RETURN How it works 10: Goes to initialization section to read in data. 30: RM is the room you're in. 40-50: Set the starting time and pulse rate. 90: Prints any comment stored in RS. 100-160: Workout floor and room you are in from value of RM and print this information. 1 70-180: Print other information. 190: GF is a flag which is set when there is a nasty ahead. 200; Checks if you've reached the last room. 210: Selects room for trap door. 220: Random chance of there being something ahead. Goes to c subroutine if there is. 230-280: Get player's input and act on it. 290: Increases time. 300: Tests for midnight. 4^310: Tests if pulse rate is too high. *30: Checks if you are in room with trap door. 400-410: Move forward routine. Increase pulse if there's a nasty. 420-460: Select a type of nasty and its shock rating. 470-510: Read in data for start of game (initialization). 520: Trap door subroutine. Conversion lines $ 40,210,220,290.350,420,440 Replace RNQU) Nith RND ■ 40,210,220,290,330,420,440 Replace RND I l j kith RND 10) ▲ 60 PRINT CHR$(147J:PRINT:PRINT • 60 HOME: PRINT: PRINT • 240 LET I$=INK£YM0> A 240 SET I* • 240 I|="iIF PEEK(-16384i>127 THEN 6ET U $ 470 DIM 61(3,15) Imll/" I. i. Skulls oftfiePyramid i A mind without a body - that's all you've been since that terrible accident all those years ago, during the building of The Pyramid. It takes all your mental energy to satisfy the Evil Spirit Master's demands. Every day he forces a number into your mind (if only you could turn him off!). You must will skulls to fall of f The Pyramid onto the numbered stones below in an attempt to score that number. Press 1 , 2, 3 or 4 to release a skull. You must use five skulls each go - no more, no less. Score the right number and rid yourself of the Curse of The Pyramid. Increase the value of SP in J line 10 to speed up the J program. \ 10 LET TS=0:LET IJ="C":LET SP=3 [20 LET N=INT(RNDI1)*30)+10 .30 CLS:PRINT 40 PRINT "SKULLS OF THE PYRAMIDS" 50 PRINT PRINT "YDU ARE REBUIRED" 70 PRINT "TO GET ";N:PRINT BO LET K=3000:G0SUB 540 •a 90 CLS: LET Y=2 100 FOR 1=1 TO 4 110 LET A*=STR$(I):LET X=6+2*I 120 60SUB 560 130 NEXT I 140 LET A$» ,A *tFQR 1=1 TO 5 150 LET Y=2+2*I 160 FOR J=l TO 1+3 70 LET X=7-I+2*J 180 G0SUB 560 190 NEXT J 200 NEXT I 210 LET Y=14 220 FOR 1=1 TO 9:LET A$=STR$(I) 230 LET X=1+2*I:G0SUB 560 240 NEXT I 250 LET S=0 260 FOR 1=1 TO 5 270 LET A$="CH0QSE ROM" 280 LET X=0:LET Y=0:60SUB 560 ★•a 290 LET IMNKEY* 300 IF I*=""THEN GOTO 290 310 LET R=VAL(I*) 320 IF R<1 OR R>4 THEN GOTO 290 330 LET Y=3 j LET K=400:LET X=6+2*R How the program worl 10: Sets variables at beginning of game. 20: Chooses number that player must score. 30-80: Print starting message and wait for player to see it. 90-240: Print out pyramid and the numbers at the top and bottom of it. 350 LET A$= a 0" 360 GOSUB 560 370 GOSUB 540 380 LET A$=" 11 : GOSUB 560 ■$390 IF F=0 AND Y<13 THEN LET X=X+SGN (RND ( 1 ) 5) 400 LET Y=W:LET F=l-F 410 IF Y<14 THEN GOTO 350 420 LET S=SHX-l>/2 430 LET X=15:LET Y=0 440 LET A$=STRf(I)+":"+STR$(S) 450 GOSUB 560 460 NEXT I 470 LET K=1000:GOSUB 540 480 LET D=ABS(S-N):LET TS=TS+D •A490 CLS?PRINT:PRINT 500 PRINT "YOUR RATING IS NOW ";TS 510 IF D>1 THEN LET K=3000:GOSUB 540:G0T0 20 520 PRINT "AND YOU CAN GO FREE!" 530 STOP 540 FOR T=l TO K STEP SP:NEXT T 550 RETURN (•a 560 PRINT TABU,Y);A$ 570 RETURN 350-320: Print the skull and wait. 380: Remove the skull. 390: Choose which way to bounce (if value of F allows sideways bounce). 400: Moves skull down one row. 410: Checks if skull has the bottom. 430-450: Print out score. 470: Waits. 480-500: Add difference between score and number required to total score. Clear screen and print score. 510: If difference is greater than 1, goes back for another go. 520:Prmtswinnmgmessage. 540-550: Subroutine to make computer pause for length of time depending on K. 560-570: Subroutine to move cursor to position X, Y on the screen. Don't suppose you're clever enough to change the limits of the number to be Conversion lines $20,390 Replace RNDUi with RND ■ 20,390 Replace RND(l) with RND(0) • 30,90,490 Replace CLS with HOME A 30,90,490 Replace CLS with PRINT CHR$(147) • 290 LET I*=INKEY$(0 • 290 I$= n ":IF PEEK(-16384)>127 THEN GET 1$ a 290 GET 1$ O560 PRINT AT Y,X;A$ • 560 VTAB ( Y+l > ; HTAB (X+l > : PRINT A$ A560 PRINT CHR*( 19) ; :F0R LL=1 TO Y: PRINT: NEXT: PRINT TAB(X) ; A* ■ 560 PRINTS Y*32+X,A$; Monster wrestling is a sport for lunatics! Which doesn't say much for you -the brain in charge of this hulk of bone and muscle which is about to take on some of the nastiest monsters in the Universe. As brain, you must do a lot of quick and accurate calculations. You must work out the muscular effort required to hold off the monster, for instance, and this involves multiplying the size of the monster by the distance it is away from you. If the numbers look too difficult, you can press the Panic Button (key P). You must then work out how much adrenalin the body needs to survive the crisis, by dividing heartbeat increase required by oxygen supply. Take care though, over- use of the Panic Button puts too much strain on the heart and will eventually cause a black out. To live to fight another match, you must survive 12 rounds against the monster. 20 LET P=0 30 LET K=3 10 CLS 50 LET K»l 60 LET Y=6 70 LET N=-l 75 LET N=N+1 LET G=INT(RND(1)*Y+X) LET I=INT(RND(1)*K+K) 100 LET Y=Y+0.5 110 LET M+0.5 120 LET K=K+0.5 130 PRINT 140 PRINT 150 PRINT "SIZE OF MONSTER: 160 PRINT G 170 PRINT 180 PRINT "DISTANCE AWAY: » 190 PRINT I 200 PRINT 210 PRINT "MUSCULAR EFFORT? 220 G0SUB 570 230 IF ZOGtl THEN GOTO 320 •a 240 CLS 250 PRINT "MONSTER KEPT AT BAY" 260 IF N<11 THEN GOTO 75 270 PRINT "PHEM!!!!-THE MONSTER" PRINT "IS TIRED AND HAS GONE TO PRINT "LOOK FOR ANOTHER VICTIM. " 300 PRINT "YOU SURVIVE TO TELL THE TALE! 310 STOP •a 320 CLS 330 PRINT "YOU HAVE BEEN CRUSHED 340 PRINT "TO A PULP IN THE" 350 PRINT "MONSTER'S HUGE ARKS" 360 PRINT 370 PRINT "YOU SURVIVED »}».•' ROUNDS" How the program works 20: Sets number of panics used to 30-60: Set upper limits for size of ZO:Setsnumber of rounds. 80: Sets monster size. 90: Sets distance away. 100-120: Increase upper limits for size and distance by 0.5 each round. 210-220: Ask for answer and go to subroutine to deal with it. 230: If answer incorrect, jumps down program for losing 250: Message if round won. 260: Goes back for next round. 270-310: Winning message if you survive 12 rounds. 330-380: Losing message. If you keep losing, you'd better slow the program down by increasing the value of O in line 660. 280 C Decrease Q if the game | is too easy for you. Jaws Mmmmmm . . . people do taste yummy! But, with The Hunter forever on your tail, it's difficult to get close enough to catch them. You are J (for Jaws) and you can move around by pressing keys A, Z, N and M. See how many Ps (people) you can eat before H catches you. There's a snag (of course). Each time you succeed in catching and devouring a delicious human being, you get so OlO DIN HIH2):DIH K$(4>:G0SUB 660 20 LET S=0:L£T T=0: LET G=0 30 LET U=I 40 LET K$(1)= B A H :LET K$(2J="fl" 50 LET K*(3)='Z"rLET K$14)= I N U 60 LET PX=2:LET PY=2 70 BOSUB 600 80 6DSUB 490iGCSUB 440 90 LET NX=PX:LET NY=PY ★±•100 LET I*=INK£Y$ 110 IF IJ=K$(1) THEN LET NY-NY-l 120 IF I$=K$(2> THEN LET NX=NX+I 130 IF I$=K$(3J THEN LET NY=NY*1 140 IF I$=U(4J THEN LET NX=NX-i 150 LET X=NX:LET Y=NY;60SUB 530 160 IF F=l THEN 60T0 230 170 LET X=PX:LET Y=PY: LET A5=" 1 180 GQSUB 640 190 LET X=NX;LET Y=NY:LET A$='T 200 6QSUB 640 210 LET PX=NX:LET PY=NY 220 IF PX=TX ANE PY=TY THEN G0SUB 340 230 IF PX=GX AND PY=GY THEN GOTO 280 ■i£x240 IF RNDU> >U THEN GOSUB 370 250 LET X=14:LET Y=12:LET A$=STR$(T) 260 GD5UB 640 270 LET G=G+1;GQT090 280 FOR P=l TO 2000:NEU P I dare you to make the hunter move more often How the program works 10: Sets aside memory space for the grid. Goes to subroutine to read in data for grid. 20: Sets variables to zero for start. 30: Sets how often hunter moves. 40-50: Set directions in which keys move. Conversion lines $10 DIM M(12,16):DM <$(4):G0SUB 660^ ★ 100 LET 1*=INKEYH0> • 100 I*= un :IF PEEK(-163B4)>127 THEN GET 1$ AiOO GET 1$ $240,390,400,550,560 Replace RND(l) with ■ 240,390,400,550,560 Replace RNDtl) with RND(0I #290,600 Replace CLS with HOME A290,600 Replace CLS mth PRINT CHRK147J $539 LET F=0:IF n*lY,X><>" " THEN LET F=l $640 PRINT AT Y,X;A$ •640 VTAB(Y):HTABU):PRINT A$ A640 PRINT CHR$(19);:F0R LL=1 TO Y:PR1KT:NEXT: PRINT TAB ( X > ; AS ■M) PRINT* Y*32*M$j 70: Goes grid. 80: Goes to subroutines which choose positions for hunter and person. 90: Sets Jaws' position to new position. 1 00-140: Calculate new position of Jaws 150: Checks this new position is not a walL 160: If it is a wall, don't move. 1 70-180: Print space at Jaws' old position. 190-200: Print J at Jaws' new position. 210: Sets Jaws' position to new position. 220: Checks if J landed on P and if so, goes to subroutine. 230: Chocks if J landed on H and, if so, goes down program to end game. 250-260: Print score so far. 270: Increases number of moves and goes back for next one. 280: Pauses so you can see if youVe been caught. CLS: PRINT "YOU HAVE BEEN CAUGHT'" LET S=INT(10000*(T/6)>:PRINT "YOU SCORED '?5 PRINT.-PRINT "ANOTHER 60? IY/N)" INPUT At: IF A*="V THEN GOTO 20 STOP LET T=T+1:LET U=U-0.03 G0SU6 390:G0SUB 490 RETURN LET X=6X:LET Y=5Y : LET A$=" 1 GOSUB 640: GOSUB 440: RETURN LET K1 = INT(RNDI;)*4J + 1 LET K2=INT(RNDIL)*4)+1 LET TI=K$(Ki> LET K$(Kn=K$(K2)!LET K$IK2I=T* RETURN GOSUB 550 IF X=H AND Y=TY THEN GOTO 440 LET GX=X: LET GY=Y LET A$="H':GOSUB 640 RETURN GOSUB 550 LET TM:LET TY=Y LET AJ="P":G0SU6 640 RETURN LET F=0:IF MID5iM*(Y> ,X,IK>" ' THEN LET F=l RETURN LET X=INTEftNDUl*!4>+2 LET Y=INT<RND<1 ]*9)*2 60SUB 530 IF F=l THEN 60TC 550 RETURN CLS: LET Ul FOR Y=l TO 12:LET A$=N$(Yi GOSUB 640:NEXT ) RETURN PRINT TA81X,Y);A$ RETURN FDR 1=1 TO 12: READ «$(Ii:NEXT I RETURN DATA "QODOOGOODOODOOOD" DATA "0 0" DATA '0 000 00 000 G" DATA -0 Q" 0000 0" 0" DATA '0 DATA "0 DATA "D 00 0" DATA "0 00 0" DATA "0 00 OOO 0" DATA "0 0' DATA "OOOOOODOOCOODOOO" 290-330: Print message and score if Jaws is caught. Ask if player wants another game. Skeleton speech bubble Score depends on number of people eaten and number of moves. 340-360: Subroutine which increases score and chance of hunter moving and goes to other subroutines to change keys round and set new person position. 370-380: Subroutine which] hunter from old position ; in new one. 390-430: Subroutine which changes keys around. 440-480: Subroutine for printing hunter, using another subroutine to choose a random position for him. Line 450 checks position chosen does not already have a person in it. 490-520: Subroutine for printing person, using another subroutine to choose random position. 530-540: Subroutine i position X,Ycoi doesFissettol. checks if a wall. If it 550-590: Subroutine which chooses a random position and checks it is not a wall. 600-630: Subroutine which prints out grid. 640-650: Subroutine which prints at position X,Y. 660-790: Subroutine which reads in data for grid. These lines make the grid. You could change it by drawing a new grid on squared paper and copying it into the program using O for walls and spaces for passages. As chief assistant to Superwitch, your job is to fly across the land on your broomstick collecting fresh ingredients for her putrid potions. You will know exactly what to collect each time because she transmits her revolting recipes directly to your computer screen. Ingredients such as T (Toe of Newt) and B (Brain of Bat) flash past beneath you as you fly. Press any key to swoop down and pick one up (you must land right on top of it to do so). Take care, some of them could be the Broomstick Snatcher in disguise. If you land on her, you'll lose your stick. (Luckily you start the game with three spares.) You must collect everything you need before you get to the Cauldron or Superwitch will nof be pleased with you . . . 10 60SUB 700:GOSUB 620 20 LET HNMsLET M=0: LET FM=50 30 GQSUB 530:LET H=NH 40 G0SUB 550 50 LET EF=0: LET FF=0: LET HH=H 60 FOR 1=1 TO 4: LET G(I)=0:NEXT I 70 FOR 1=1 TO 4: LET A*=PJiI>t":":LET 80 LET Y=1H;G0SUB 610:NEXT I 90 GOSUB 490:GQSU8 430 100 IF M=FM THEN GOTO 250 110 IF EF=1 THEN 60T0 230 20^ INKEVttO)*" THEN GOTO 90 130 LET HH=H-1:G0SUB 510 140 GOSUB 490:G0SUB 430 150 LET H=HH 60 IF H>0 THEN GOTO 130 170 IF P-17 THEN GOSUB 320 180 IF FF=1 THEN GOTO 240 190 GOSUB 530 200 LET HH=H+1:G0SUB 510:80SUB 490 210 LET H=HH: IF H=NH THEN GOTO 90 220 GOSUB 430: GOTO 200 230 LET A$="WELL DONE' SUPERWITCH I 240 LET A$='QUT OF BROOMSTICKS f :"G 250 LET A*="TQQ LATE!" 260 LET X=1:LET Y=15:G0SUB 610 270 STOP 2S0 LET A$="«":LET X=P:G0SUB 610 290 FOR T=l TO 1000: NEXT T 300 LET NW=NW-1:IF NW=0 THEN LET F 310 RETURN 320 IF H*I THEN GOSUB 280:RETUfl 330 LET G(RI=G(R)H 340 LET A$=STR$(G(R)):LET K=l 350 LET Y=1 + R:G0SUB 610 /^ chMgmglhe 360 LET P=19:G0SUB 430 ( lettersinto 370 LET F=0 /graphics symbols. 380 FOR 1=1 TO 4 How the program works 20: Sets up variables. (See if you Too hard for you? Make the game easier by increasing the value of FM in line 20. This puts more objects between the start and the cauldron. 30: H is your height above the ground. NH is your new height after a dive. 50: EF and FF are flags which are set if game is finished. HH is a variable for holding intermediate heights on the way up or down. 60: G ( ) counts how many of each type of object you've picked up. 70-80: Print recipe. 90-120: Move "ground" and objects across screen until a key is pressed. 130-160: Keep ground and objects moving and move witch down to ground level. 170: If P= 17 then witch has landed on object. 1 80: Checks flag for end of game. 200-220: Move ground and objects past until witch reaches new height. 230-270: End messages. 280-310: Subroutine which shows W if object is Broomstick Snatcher in disguise. Increases NW and sets FF if all broomsticks used up. 320: Subroutine which checks if you landed on Broomstick 330-350: Increase number of object R collected and print new total on screen. 370-420: Check if all ingredients fortius recipe have been collected. 390 IF Gfl)M(I) THEN LET F=F+i Why not change the ingredients? NEXT I IF F=4 THEN LET EM RETURN LET BD=8D+i:IF 6D=6 THEN LET GD=1 LET A$=G*fSD)iLET X=1:LET Y=15:6DSUB 610 LET m m ";LET X=P:LET Y=i4:G0SUB 610 LET P=P+1: IF P=20 THEN GQSUB 550 LET X=P:LET A$=C$:60SUB 610 RETURN LET A$= H -y-=";LET X=16:LET Y=14-HH GQSUB 610:RETURN LET A*= u H : LET X=16:LET Y=14-H GQSUB 610:RETURN LET NH=INT(RNDU>*5+3) RETURN LET R=INT(RNDil)*4)+l LET W=0: IF RND(l) >0.8 THEN LET W=l LET C*=LEFTI(P*(R),1):LET P=l LET IF M=FM THEN LET C$= u CAULDRON" RETURN PRINT TAB (X , Y) ;A$: RETURN T CLS; PRINT: PRINT PRINT "THE POTION MUST HAVE" i PRINT FOR 1=1 TO 4 LET N=INT(RND(1)*3)+2!LET NfI)=N PRINT:PRINTiN|" ";P$(D NEXT IiPRINT: PRINT PRINT "PRESS RETURN TO PLAY" INPUT X$:CLS:RETURN DIM PJ(4):DI« N(4):DIN 6(4) DIM G$(5) FOR 1=1 TO 4: READ P$(I);NEXT I DATA "TOES OF NEWTS", "EYES OF LIZARDS", "ROOTS LET Hl=">====>====>====>====>====" FOR 1=1 TO 5: LET 6$(6-I)=MlD*(H$, 1,1+20) NEXT I:LET GD=1 RETURN 430-480: Print new section of ground and move the object along to position P. If object is past the witch (i.e. P=20, then choose a new object). 490-500: Print witch. 510-520: "Unprint" witch. 530-540: Choose new height for witch. 550: Chooses an object. 560: Random chance of object being Broomstick Snatcher. 570: Pats first letter of object in C$ and sets position P to 1. 580: Increases object counter, M. 590: If M equals maximum number of objects allowed, then CS changed to "CAULDRON". 610: General subroutine to move cursor ready for printing. 620-690: Choose and print recipe. 700-270: Set up data for start of program. P$ holds names of objects. H$ holds symbols for ground. Line 750 moves the > symbols along each time. What will Superwitch do to you if you fail? Try adding comments and penalties to the game OF IVYVBRAINS ® BATS" suif ^\ nts r% Conversion lines 120 IF 1NKEY*="" THEN GOTO 90 120 6ET I$:IF 1$="' THEN GOTO 90 120 U="':IF PEEK(-16384)>127 THEN GET 1$ 125 IF 1$="" THEN I 125 *FJ15,1 $530,550,560,650 fteolace RND(l) Kith RND ■ 530,550,560,650 Replace PND(i) with RND (0) 570 LET C*=P*(R, I) : LET P^l 610 PRINT ftT Y , X : A*; RETURN AfclO PRINT CHR$(1?):FQR LL=1 TO Y: PRINT: NEXT: PRIMT TAB t X J ; A*: RETURN • 610 VTA8 < Y > :HTAB ( X > : PRINT A$; RETURN ■ 610 PRINTS V*32tJ(,fl$i: RETURN ▲ 620,690 Replace CLS with PRINT CHR$(1471 • 620,690 Replace CLS with HOME $700 DIM P*i4,!5):DIM NMhDIM 6(4) 0:710 DIM G*«5,24> $750 FDR 1=1 TO 5: LET G*(6-1)=HJU TO 1+20! MieropiizzU What's happened? Where are you? Everything appears fairly normal, though you do feel a bit sick. Better take a look round and see if you can find out what's going on. (Hint: Try talking to your computer in two word sentences.) _ How the program works Lines 30-360: MAIN GAME SECTION 1A RnCUQ 1S7A 10: Goes to subroutine to read in all the data. 20 RESTORErFGR 1=1 TO R:READ D*: NEXT I GO CLS:PRINT "MICRO PUZZLE" 40 PRINT ''============" 50 PRINT "YOU ARE ";D* 20-50: Get a room description and P™* it. 60 IF R=20 AND F(9)=0 THEN PRINT "YOU ARE CONFRONTED BY A LARGE CAT 70 FOR 1=1 TO 6 80 IF L(I)=R AND F(I)=0 THEN PRINT "THERE IS A ";0*(I>;" HERE, 90 NEXT I 70-90: Check if there is anything there. 100 PRINT: PRINT "YOU CAN GO "} 110 FOR 1=1 TO LENfRJ(R)) |$120 PRINT l1IDI(R$(R),I,l);","i 130 NEXT I 1 00-1 30: Find which directions you can go in and print them. 140 PRINT:PRINT "-- 1 50 PRINT M*; LET M$="WHAT?" 150: Default message. 12 160 IF F(16)=l THEN PRINT "SELF DESTRUCT COUNTDOWN AT :";L 170 PRINT "WHAT WILL YOU DO NOW": INPUT Q$ 180 LET V$="":LET WJ="":LET VB=0:LET 0B=0:LET LI=LEN(QI> $190 FOR 1=1 TO LI 200 IF MIDJ(Qi,I,l)=" ' AND VJ="" THEN LET v*=LEFT$(QI,I-l) 210 IF MID$(Q*,I+!,1)<>" " AND V$<>"" THEN LET N$=RISHT$(Q$,LI-I):LET I=LI 220 NEXT I 120-220: Get your instructions and split them into two words. 230 IF m" THEN LET V*=Q$ *240 FDR 1=1 TO V 250 IF Vmtm THEN LET VB=I 260 NEXT I 230-260: Check fiist word is a verb. GOSUB 440 270: Goesto subroutine to check second word. 280 IF VB=0 THEN LET VB=V+1 290 IF my" AND QB=0 THEN LET M*= B THAT IS SILLY" 300 IF W$="" THEN LET M$= U I NEED JWO WORDS" 310 IF VB>V AND 0B>0 THEN LET H$="Y0U CAN'T "+Q$ 320 IF VB>V AND 0B=0 THEN LET M$="Y0U DO NOT MAKE SENSE' 280-330: Set up messages if necessary. IF VB<V AND 0B>0 AND DB<=G THEN LET M$='YQU DO NOT HAVE "+W* 340 LET L-L-l 340: Counter. 350 IF VB>14 THEN GOTO 380 350-380: Goes to #360 ON VB GOSUB 480, 550, 550,550,550, 550, 550, 550, 760, 790, 790, 860, 920, 970 subroutine 370 GOTO 390 ££55* #380 ON VB-14 GOSUB 1080,1100,1180,1250,1320,1340,1370,1400,1460,1510,1560 390 IF F ( 1 4 ) =0 AND DO THEN GOTO 20 a 400 IF L<1 THEN LET M*="Y0U HAVE RUN OUT OF TINE. THE 410 PRINT Nf:PRINT "GAME OVER" 420 IF L>0 THEN GOSUB 1510 430 STOP FOR 1=1 TO M IF W*=0$II) THEN LET 0B=1 NEXT I Type I if you want an inventory (that is, a list of what you are carrying). V 440-470: Subroutine which checks if second word is on computer's object list. 480 PRINT "YOU ARE CARRYING:" 490 FOR 1=1 TO S 500 IF L(I)=25 THEN PRINT OKI);","; 510 NEXT I 520 LET Mf= u ":PRINT 530 GOSUB 1550 540 RETURN 480-540: Subroutine which tells you what you are carrying. 550-750: Subroutine which deals with your instructions about which direction you want to go. 550 LET D=0 560 IF 0B=0 THEN LET D=VB-2 570 IF 0B>24 THEN LET D=0B-24 580 IF R=19 AND D=6 THEN LET D=4 590 IF R=20 AND D=6 THEN LET D=4 600 IF R=20 AND D=5 THEN LET D=3 610 IF F(9)=0 AND R=20 AND D=4 THEN LET M$="THE CAT WILL NOT LET YOU": RETURN #620 IF R=2 AND L(l)=25 AND D=3 THEN LET H$=M$: RETURN 630 IF R=7 AND F(3)=0 THEN LET M*="AN ANGRY MOUSE BARS YOUR WAY":RETURN 640 LET F(13)=0:LET RL=LEN(R$(R) ) 650 FOR 1=1 TO RL #660 LET U*=MID$(R*(R),I,1) 670 IF <U$="N" AND D=l AND F(13)=0) THEN LET R=R-6:LET F(13)=l 680 IF (U$="S" AND D=2 AND FU3)=0) THEN LET R=R+6:LET F(13)=l 690 IF (U*="W" AND D=3 AND F(!3)=0) THEN LET R=R-1 : LET F(13)=l 700 IF <U$='E" AND D=4 AND F(13)=0) THEN LET R=R+1:.LET F (13) =1 710 NEXT I If you are usini a VIC 20, you uill need extra aeaory Wis ga*e. 720 LET M$="0K B 730 IF F(13>=0 THEN LET M$="Y0U CANNOT 60 740 IF D<1 THEN LET M*="GO WHERE?" 750 RETURN Have yon played a few times and decided you'll never be able to win? Tou can give yourself more time if yon like by putting a higher value for L in the middle of line 1910. 760 LET Mf="ARE YOU PRACTISES FOR THE OLYMPICS?" 770 IF F (10) =1 AND (R=9 OR R=3) THEN LET M*="IT IS TOO FAR TO JUMP" 780 RETURN :790 IF 0B=B THEN LET «*=V$+" THE "+W$+M2*: RETURN 800 IF 0B>6 THEN LET MI="I CANNOT GET THE "W:RETURN 810 IF L(0B)OR THEN LET M$="IT IS NOT HERE' 820 IF F(0B)O0 THEN LET M$="WHAT "+«$+"?" 830 IF L(0S)=2S THEN LET M*="Y0U ALREADY HAVE IT" IF 0B>0 AND L(08)=R AND F(0B)=0 THEN LET LI0B)=25:LET M$=M3$+W$ 850 RETURN 860 IF LI0BX25 THEN RETURN 870 LET M*="N0T REALLY!": IF QBOl THEN RETURN 880 PRINT "PUT KEY WHERE" 890 INPUT Wf:IF m>"" THEN G0SUB 440 IF (0B=8 OR W$="0N »+0$(8)) THEN LET M*=N4*:LET FU5)=1:LET L(1)=R RETURN IF F i 1 2 ) =0 AND L(7)=25 THEN LET F(11)=1:LET F(3)=0:LET L(3)=0:LET M$=M5$ IF F C 1 ! ) = 1 AND LI7)=25 AND R=20 THEN LET F(9)=1:LET M1=M*+M6* IF R=21 AND 08=24 THEN LET F(4)=0:LET M*="DUST SETTLES" IF QB=16 THEN G0SUB 970 RETURN LET M$=" NOTHING OF INTEREST" IF 0B=16 AND R=12 THEN LET FI2)=0:LET M$="IT IS A MICRO - VCR" IF 0B=24 AND R=21 THEN LET M*="S0METHINB INSIDE" IF 0B=19 AND R=24 THEN G0SUB 1400 IF 0B=23 AND R=12 THEN LET M$=M7f IF 0B=7 THEN LET M$="IT CONTAINS A LARGE FLY" IF DB=9 AND R=20 AND F(9)=0 THEN LET M*="IT BITES AND SCRATCHES'" IF 0B=4 THEN 60SUB 1080 IF 0B=1 AND L(l)=25 THEN LET M$?"THE NUHBER '111' IS ENGRAVED ON IT" IF 0B=6 AND L(6)=25 THEN LET M$=" THERE IS A BIG RED BUTTON" RETURN LET M$=MG$:IF 0B=4 AND L(0B)=25 THEN LET Mf=MFI RETURN IF 0BO5 THEN LET M$="CANN0T TIE "+W$:RETURN IF LI5X25 THEN RETURN LET Wf="":PRINT "TIE THE THREAD TO WHAT" INPUT m IF W$>"" THEN GOSUB 440 LET H$="CANN0T TIE IT TO "+WJ * IF 0B=13 AND R=9 THEN LET F(5)=1:LET LI5)=0:LET MI=M8$ RETURN IF 0B=5 AND F(5)=0 THEN LET Mf="IT IS NOT TIED TO ANYTHING!" IF 0B=5 AND R=9 AND F<5)=1 THEN LET R=8: LET F(10)=0:LET M*="0K":RETU IF 0B=5 AND R=8 AND F(5)=l THEN LET R=9: LET F(10)=1:LET M$="DK" 1210 IF 0B=13 AND R=9 THEN LET M$="1T IS TOO SMOOTH TO CLIMB" j 1220 IF 0B=W AND R=19 THEN LET 0B=30:G0SUB 550 910 $920 $930 940 950 960 970 980 990 1000 $1010 1020 1030 1040 1050 1060 1070 $1080 1090 1100 1110 1120 1130 1140 1150 $1160 1170 1180 1190 760-1500: These are subroutines for the verbs used in the program. Look for the lines which say RETURN to see where one ends and another starts. I Unless yon are using a C Spectrum, you can leave ( out all the LETs if you like. 1230 1240 1250 1260 1270 1280 1290 1300 1310 1320 1330 1340 01 350 1360 1370 1330 1390 (This program is not explained as fully as some of the others so as not to give you too many clues about the game. Try working out what all the lines do after you have played a few times. 1410 1420 1430 1440 1450 O1460 O1470 1430 1490 1500 IF-0B=W AND R=20 THEN LET 0B=29:B0SUB 550 RETURN IF mm OR L(6K>25 THEN RETURN LET WI="":PRINT "POINT IT AT WHAT" INPUT m IF '«$>." THEN G0SUB 440 IF DB=22 THEN LET F(6)=l LET M*="VERY WELL" RETURN IF 0B=3 AND L(0B>=25 THEN LET L(0B>=0:LET M*="MUNCH CHOMP" RETURN IF (08=19 OR 08=17) AND R=24 AND LUX25 THEN LET M*=M9*:LET L=L-12:LET F<16)=1 IF (0B=19 OR 0B=17> AND R=24 AND L ( 1) =25 THEN LET F(12)=1:LET M*=MH$ RETURN IF 0B=3 AND R=7 AND LiOB>=25 THEN LET F(3)=1:LET L(0B)=0:LET B=B+1 : LET M*=MA$ IF L(0B)=25 THEN LET L (08)=R: LET M$="D0NE" RETURN IF R024 THEN LET M*="N0THING HERE TO TYPE ON! ":RETURN IF FI12)=0 THEN LET M*='THIS TERMINAL IS N0N -ACTIVATED": RE TURN LET H$="THE TERMINAL ECHOES :"+W* IF 0B=18 THEN LET Mt="C0DEW0RD ACCEPTED': LET FI17)=1 IF 0B=20 THEN LET M$="TERMINAL ID" RETURN IF R=14 AND 08-11 AND L(8)=22 THEN LET L(B)=14:LET Mi=MBf+MCf: RETURN IF R=14 AND 0B=11 AND L(8)=14 THEN LET L(8)=22:LET M$=M8$+MD$ IF F(15)=l THEN LET L(1)=L(8) IF 0B=21 AND F(6)=l AND L(6)=25 AND R=18 AMD F(17)=l THEN LET B=B+10: LET H*=HE*:LET F(14)»l RETURN 1510 LET S=0:F0R 1=1 TO 8 1520 IF L(I)=25 THEN LET S=S+1 1530 NEXT I 1540 LET S=S+B: PRINT "YOUR SCORE = "jS 1550 IF F(14)=0 THEN PRINT "PRESS RETURN TO CONTINUE": INPUT 8$ 1560 RETURN 1510-1S60: Scoring subroutine. 1570 1580 iS'O LET V=24:LET W=31:LET 6=8 DIM R*(24):CIM 0$iWI:DIM Hf(V) DIM L(G):DIM F(17) 1570-1590: Setup variables and dim sns ion snsys. 1600 DATA 1610 DATA 1620 DATA 1630 DATA 1640 DATA 1650 DATA 1660 DATA 1670 DATA 1680 DATA 1690 DATA 1700 DATA 1710 DATA 1720 DATA 1730 DATA 1740 DATA 1600-1820: Data lines "INSIDE THE MOUSEHOLE - IT IS VERY DARK IN HERE" "AT A MOUSEHOLE IN A CORNER OF THE ROOM", "ON THE EDGE OF A HIGH TABLE 1 "AT THE BACK OF A HALLWAY", "IN A STORAGE ROOM", "IN THE KITCHEN" "FURTHER DOWN A DARK SMELLY TUNNEL" , "BY A RAILWAY SIDING" "AT THE BASE OF A TALL PLASTIC TREE ON THE EDGE OF A HIGH TABLE" "OUTSIDE THE OPEN DOOR OF AN ODDLY PROPORTIONED HOUSE" "IN A YELLOW FRONT ROOM", "BY A TV SET AND A RECORDER" "AT THE END OF A DARK TUNNEL" "BY A LARGE SWITCH CONNECTED TO THE RAILWAY TRACKS" "ALONGSIDE THE WINDING TRACK" "AT THE END OF THE LINE-THE TRACK DISAPPEARS THROUSH A HOLE IN THE WALL" "BELOW A WHOLE WALL OF OVERSIZED VIDEO SCREENS" "STANDING ON THE MAXIfllSER PAD" "ON A SHELF OF DISTURBING APPARATUS - THERE IS A STOOL NEARBY" "ON A SHORT STEP STOOL" 1750 DATA "ON THE FLOOR OF AN OVERTURNED BOX OF BROKEN ELECTRONIC PARTS" 1760 DATA "AT A HOLE IN THE MALL FROM WHICH A RAILWAY LINE EMERGES" 1770 DATA "AT THE BASE OF A SWIVEL CHIAR" 1780 DATA "STANDING ON A COMPUTER TERMINAL WITH A SECRURITY LOCK" 1790 DATA 16,12,3,21,5,17,19,14 1B00 DATA "r l ,"GO","N","S" 1 "W","E","U","D","JUHP","GET","TAKE"/PUT","OPE(l" 1810 DATA "EXAMINE" , "READ" , "TIE" , "CLIMB" /POINT" , "EAT", "UNLOCK" , "LEAVE" , "TYPE" 1820 DATA "PRESS", "SCORE", "SE","SW","SE", "SHE", "WE", "SW","NS","NS","NE","NW" 1830 DATA "EW" , "NW" , "NS" , "NE" , "EW" , "W" , "3" , "S" , "NED" , "EWUD" , "EW","EW","NEil" 1840 DATA "NW" , "KEY" , "CASSETTE" , "CHEESE" , "PAPER" , "THREAD" , "REMOTE-CONTROL" A1850 DATA "BOTTLE" , "TRAIN" , "CAT", "DOOR" , "SWITCH" , "TUNNEL" , "TREE", "HOLE" , "HOUSE' 1860 DATA "VIDEO" , "COMPUTER" , "GROCER" /TERMINAL" ,"111", "BUTTON" , "MAXIMISER" 1870 DATA "TV" , "BOX" , "NORTH" , "SOUTH" , "WEST" , 'EAST" , "UP" , "DOWN " , "STOOL" O1910 LET R=11:LET B=S: LET L=100:LET M*="YQU AWAKEN. . " : LET HHf=" TERMINAL ACTIVE" O 1920 LET M1*="Y0U CANNOT TAKE THE KEY THROUGH" : LET M2$=" EH? VERY FUNNY!" 1930 LET M3$="Y0U HAVE THE " : LET M4$="WELL DONE! ": LET MG$="NOTHING OF INTEREST" # 1940 LET M5$="A LOUDLY BUZZING FLY FLIES OUT':LET MBI="THE TRAIN CHUGS " # 1950 LET M7$="IT IS JUST A BOX WITH PHOTO STUCK ON" : LET M9$="»! TAMPER *!" #1960 LET M8f="IT IS SECURELY TIED. ":LET M6$=' AND THE CAT CHASES AFTER IT!" #1970 LET MAI- "THE HOUSE RUNS OFF WITH IT. " : LET MF*="TERMINAL PASSWORD"" +0* < 18) #1980 LET MC*="INTO SIGHT AND STOPS HERE": LET HD*="AWAY AND INTO A TUNNEL" #1990 LET ME$=°THE MAXIMISER BEAM WORKS. YOU ARE RETURNED TO NORMAL SIZE" 2000 RETURN 1910-2000: Set up messages. Conversion lines a 30 Replace CLS with PRINT CHRK147) • 30 Replace CLS with HOME . . . FOR SPECTRUM USERS # 120 PRINT R*(R-,I>; 190 FOR 1=1 TO LI-1 200 IF Q$(I)=" " AND V$="" THEN LET V$=Q$i TO 1-1) IMPORTANT NOTE for Commodore users. If you are using a C64 or a VIC 20. you must leave out the LETs in lines 400, 1340, 1370 and 1490. If you are using a C64, you must leave out all the spaces in lines 1490, 1 700 and 1850. I 4 210 IF 8fil + l)<>" ■ AND m>" THEN LET W$=G$iI+l TO );LET I=LW 235 IF LEN(V$i<7 THEN LET Vf=V$+" n ;GOTD 235 360 GOSUB 480*WB=1)+550*(VB>1 AND VB<9)+760*(VB=9)+790#{VB=10 OR VB=U) f860*(VB=12)m0*iVB=13)+97OMV8=14) 380 GOSUB. 1080*iVB=i5)+1100*(VB=16)+ii80*{VB=l7)+i250*(VB=18)+i320*<VB=l?)+1340*iVB=20) fl370*(VB=21i + 1400*(VB=22)+1460*<VB=23)+1510*(VB =24>M560*tVB=25) 440 IF LENlHIKH THEN LET W$=W$+" ":GQTD 440 445 FOR 1=2 TO « 660 LET U$=RliR,I) qaa tc <nn=p no w4=»'nM "+n*ffl)+" H t hpw ift m*="ufm hanf i " ■! ft fhsui-ift i mur 1910 LET R=l 1 : LET B=8:LET L=100:LET f1$="Y0U AWAKEN.." Lines 620,790,840,920,930,1030,1080.1160,1340,1350,1370,1460,1470,1490 Replace Hi$ to HH$ in these lines with the text in lines 1910 to 1990 eg. 620 IF R=2 AND L ( 1 ) =25 AND D=3 THEN LET M$="YOU CANNOT TAKE THE KEY THROUGH": RETURN Leave out lines 1920 to 1990 Answers to puzzles Here are the answers to some of the puzzles in this book. Skulls of The Pyramid To add more skulls, change the 5 in line 260 to a higher number. The limits of the number to be scored are set in line 20. As the program stands the number chosen is between 10 and 39. If you change the 30 to 40, you will get a number between 10 and 49. If you also change the 10 to 20, you will get a number between 20 and 49. Monster Wrestling To increase the number of rounds, change the number 1 1 in lines 260 and 550 to a higher number. (It must be the same in both.) If you increase the number of rounds, you may want more panics. To get these, change the number 4 in line 440 to a higher number. Jaws To make the hunter move more often, decrease the value of U in line 30, for example to 0.8. Flying Witches If you fail the program goes either to line 240 or 250 for a message. Change these to whatever you like. U sborne C omputer Books] "Highly recommended to anyone of any age." Computing Today "Without question the best general introduction to computing I have ever seen. "Personal Computer World , . perhaps the best introduction around . . .outstanding. . ."Educational Computing "These books are outstanding. . .they make all other young people's computer books look meretricious. "Times Educational Supplement Guide to Computers Understanding the Micro Computer and Video Games Computer Jargon ComputerGraphics Insidethe Chip Computer Programming Practise Your BASIC Better BASIC Machine Code for Beginners Practical Things to do with a Microcomputer Computer Spacegames Computer Battlegames Write Your Own Adventure Programs Creepy Computer Games New Titles Programming Tricks & Skills Professional tips and tricks for better programming. Experiments With Your Computer An exciting introduction to scientific investigation with a microcomputer. Expanding Your Micro A detailed guide to add-ons and interfaces. Write Your Own Fantasy Games A step-by-step guide to writing fantasy games, with program listing, Weird Computer Games, Computer Spy Games Short listings to run on most main home computers. Mystery of Silver Mountain, Island of Secrets Uniqueadventuregame books containing full program listings. ISBN D-flbQ2D-fiE7-3 780860"208273 Priated in Kelaiua